using UnityEngine;
using System.Collections;

/// \class  gkAbyssalGiantRockCollisionHandler
/// \brief  Handle the rock collision reactions
[AddComponentMenu("GK/AbyssalGiant/Rock/gkAbyssalGiantRockCollisionHandler")]
public class gkAbyssalGiantRockCollisionHandler : MonoBehaviour 
{
	/// \brief  Call at the overlapping beginning
	void OnTriggerEnter(Collider a_rCollisionInfo)
	{
		if(a_rCollisionInfo.gameObject.layer == LayerMask.NameToLayer("Submarine"))
		{
			GetComponent<gkEventComponent>().RaiseEvent(gkAbyssalGiantExplosionEvent.Explosion);
		}
	}
}
